<%@ page language="java" import="java.util.* , com.pojo.Emp" pageEncoding="utf-8"%>

<%@ taglib  prefix="c"   uri="http://java.sun.com/jsp/jstl/core"  %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'showEmps.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    


  <script type="text/javascript" src="js/showEmps.js"></script>
  
  </head>
  
  <body>
	<jsp:include page="/jsp/head.jsp"></jsp:include>
  	<a href="/WebDemo2/jsp/index.jsp" >返回</a>
  
  
  
     <h4>显示员工信息</h4>
	<input type="hidden"   id="ids"   value="">
	<table border = "1"  id="emps_table" >
		<tr>
			<td>批量处理</td>
			<td>序号</td>
			<td>姓名</td>
			<td>性别</td>
			<td>学历</td>
			<td>工作经历</td>
			<td>操作</td>
		</tr>
		<c:forEach  var="emp"   items="${ requestScope.emps }"  varStatus="index" >
			<tr>
				<td><input  type="checkbox"  value="${emp.id }" /></td>
				<td>${index.count }</td>
				<td>${emp.name }</td>
				<td>
					<c:if test="${emp.sex eq 0 }">
						<c:out value="男"></c:out>
					</c:if>
					<c:if test="${emp.sex eq 1 }">
						<c:out value="女"></c:out>
					</c:if>
				</td>
				<td>${emp.degree }</td>
				<td>${emp.work }</td>
				<td><!-- servlet/EmpServlet?method=getEmp&id=${emp.id } -->
					<a href="servlet/EmpServlet?method=getEmp&id=${emp.id }"  >修改</a>
					<a href="javascript:chck_delete('/WebDemo2/servlet/EmpServlet?method=removeEmp&id=${emp.id }')" >删除</a>
				</td>

			</tr>
		</c:forEach>
	</table>
	<span>
			<label><input  type="checkbox"  id="all" onclick="changeChk()" />全选</label>
			<label><input  type="checkbox"  id="reverse" onclick="reverseChk()" />反选</label>
			<a href="javascript:batchRemove()">批量删除</a>
	</span>

  </body>
</html>
